<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>订单确认-九果十代</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="${ctx}/mobielresouce/styles/app.css"/>
    <link rel="stylesheet" href="${ctx}/mobielresouce/styles/costom.css"/>
</head>
<body>

    <div id="page1" class="-ui-hide">
        <header class="ui-menu ui-tooltips-guide">
            <div class="ui-menu-cnt ui-border-b">
                <a href="#" class="ui-btn ui-fl">返回</a>
                <span class="ui-title">确认订单</span>
            </div>
        </header>

        <section class="ui-constom-block">
            <h3>收货信息</h3>
            <div class="ui-arrowlink">
                <a id="selectAddress" href="receiveAddress.html" class="ui-tips-info ui-arrowlink">
                    <table>
                        <tr>
                            <td>收货人：张小明</td>
                            <td>电话：18688881111</td>
                        </tr>
                        <tr>
                            <td colspan="2">收货地址：就不告诉你，就不不告诉你！！~~~</td>
                        </tr>
                    </table>
                </a>
            </div>
            <!--
            <a id="selectAddress" href="receiveAddress.html" class="ui-tips ui-tips-info ui-arrowlink">
                <i></i>地址库为空，立即去设置！
            </a>
            -->
        </section>

        <section class="ui-constom-block">
            <h3>备注信息</h3>
            <textarea name="" style="width: 100%;" placeholder="请输入备注信息"></textarea>
        </section>

        <section class="ui-constom-block">
            <h3>已选商品</h3>
            <ul class="ui-list">
            	<%for(item in checkedItems){%>
					<li id="li${item.id}">
	                    <div class="ui-avatar-lg">
	                        <span style="background-image:url(${item.goods_image})"></span>
	                    </div>
	                    <div class="ui-list-info ui-border-t">
	                    	<input type="checkbox" name="cb">
	                        <h4>${item.name}</h4>
	                        <p>${item.desc}</p>
	                        <p class="tools">
	                            ${item.price} X  ${item.goods_number}
	                        </p>
	                    </div>
	                </li>
				<%}%>
            </ul>
        </section>

        <section class="ui-goPay-bottom">

            <div class="ui-btn-wrap">
                <button id="btnPay" class="ui-btn-lg ui-btn-primary">
                    <span>应付：${itemSum}元 (包邮)</span>，去支付
                </button>
            </div>
        </section>
    </div>
	
	<script src="${ctx}/mobielresouce/js/lib/sea.js"></script>
    <script>
        seajs.config({
            alias:{
                alias:{
	                'zepto'     : '${ctx}/mobielresouce/js/lib/zepto.js',
	                'frozen'    : '${ctx}/mobielresouce/js/lib/frozen.js',
	                'handlebars': '${ctx}/mobielresouce/js/handlebars-v3.0.1.js'
                }
            }
        });
        seajs.use(['zepto', 'frozen'],function(z,fz){
            // document ready
			$("#btnPay").click(function(){
				WeixinJSBridge.invoke('getBrandWCPayRequest',
				{"appId":"",
				 "timeStamp":"",
				 "nonceStr":"",
				 "package":"",
				 "signType":"",
				 "paySign":""}
				,function(res){
			     	WeixinJSBridge.log(res.err_msg);
			     	alert(res.err_code+res.err_desc+res.err_msg);
			     });
			});

        })
    </script>
</body>
</html>
